#!/bin/env python
# coding:utf-8



import datetime
import time


# 时间戳转换时间
def time_conversion(time_strap):
    new_time = time.localtime(int(time_strap))
    new_time_str = time.strftime('%Y-%m-%d', new_time)

    return new_time_str


# 根据时间计算出所需有加的时间
def add_day(now_day, add_day_time):
    now_day_new = datetime.datetime.strptime(now_day, '%Y-%m-d')
    end_day = now_day_new + datetime.timedelta(days=+add_day_time)
    end_day_time = str(end_day.date())

    return end_day_time


